<template>
  <el-row :gutter="24" class="el-row">
    <el-col :span="24" class="el-card">
  <div >
    <iframe src="https://sugar.aipage.com/dashboard/b662a0a6c55db31fe28c77c020918336" id="mobsf" scrolling="no" frameborder="0" ></iframe>
  </div>
    </el-col>
  </el-row>
</template>

<script>
export default {
  data () {
    return {
    }
  },
  mounted(){
    /**
     * iframe-宽高自适应显示
     */
    function changeMobsfIframe(){
      const mobsf = document.getElementById('mobsf');
      const deviceWidth = document.body.clientWidth;
      const deviceHeight = document.body.clientHeight;
      mobsf.style.width = (Number(deviceWidth)-240) + 'px'; //数字是页面布局宽度差值
      mobsf.style.height = (Number(deviceHeight)-64) + 'px'; //数字是页面布局高度差
    }

    changeMobsfIframe()

    window.onresize = function(){
      changeMobsfIframe()
    }
  }
}
</script>
